package com.start.cas;

import com.alibaba.fastjson2.JSONArray;
import com.start.common.entity.StartBaseUser;
import lombok.Data;

@Data
public class CasUserInfo {
    private String nickName;
    private Integer sex;
    private JSONArray avatar;

    public static CasUserInfo created(StartBaseUser baseUser) {
        CasUserInfo userInfo = new CasUserInfo();
        userInfo.nickName = baseUser.getUserFinalName();
        userInfo.sex = baseUser.getSex();
        userInfo.avatar = baseUser.getAvatar();
        return userInfo;
    }
}
